package com.updesignsz.admin.service;

import com.updesignsz.admin.mapper.FunctionMapper;
import com.updesignsz.admin.vo.form.FunctionForm;
import com.updesignsz.commom.entity.Function;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 * Created User: lx
 * Date: 2020/4/29 15:40
 */
@Service
public class FunctionService {

    @Autowired
    private FunctionMapper functionMapper;

    public List<Function> listAll() {
        return functionMapper.listAll();
    }

    public void saveFunction(FunctionForm form) {
        functionMapper.saveFunction(form);
    }

    public void updateFunction(FunctionForm form) {
        functionMapper.updateFunction(form);
    }

    public Function getById(Integer id) {
        return functionMapper.getById(id);
    }

    public void deleteFunction(Integer id) {
        functionMapper.deleteFunction(id);
    }
}
